package ${fragmentPackageName}

import com.jess.arms.di.component.AppComponent
import com.xm98.core.base.kt.BaseKtListFragment
import com.xm98.core.base.EmptyView
import com.xm98.core.base.ViewHolder
import com.chad.library.adapter.base.BaseQuickAdapter
import ${componentPackageName}.Dagger${pageName}Component
import ${modulePackageName}.${pageName}Module
import ${contractPackageName}.${pageName}Contract
import ${presenterPackageName}.${pageName}Presenter
import ${packageName}.bean.${entityName}

import ${packageName}.R
import ${packageName}.ui.adapter.${adapterName}


/**
 * Desc: 
 * Date: time()
 * @author: user()
 * Company: @98du
 * Update Comments:
 */
class ${pageName}Fragment : BaseKtListFragment<${entityName}, ${pageName}Presenter>() , ${pageName}Contract.View<${entityName}>{
    companion object {
        fun newInstance():${pageName}Fragment {
            return ${pageName}Fragment()
        }
    }

    override fun setupFragmentComponent(appComponent:AppComponent) {
        Dagger${pageName}Component
                .builder()
                .appComponent(appComponent)
                .${extractLetters(pageName[0]?lower_case)}${pageName?substring(1,pageName?length)}Module(${pageName}Module(this))
                .build()
                .inject(this)
    }

    override fun begin() {

    }

    override fun setupEmptyView(emptyView: EmptyView) {
        emptyView.setEmptyText("没有相关数据哦~")
                 .setEmptyImageResource(R.mipmap.ic_launcher)
                 .setRetryText("重试")
    }

    override fun generateAdapter(): BaseQuickAdapter<${entityName}, ViewHolder> {
        return ${adapterName}()
    }
}
